package cn.qn.moudle.user;

import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.Table;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author: Bryant
 * @date: 2019/7/15
 * @description: 我关注的用户
 */
@Entity(name = "app_user_attention")
@Data
@Table(appliesTo = "app_user_attention", comment = "我关注的用户")
public class AppUserAttention implements Serializable {

    private static final long serialVersionUID = 4172939238271551602L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", columnDefinition = "int(11) COMMENT '主键'")
    private Integer id;

    @Column(name = "user_id", columnDefinition = "varchar(20) COMMENT '用户编号'")
    private String userId;

    @Column(name = "attention_id", columnDefinition = "varchar(20) COMMENT '关注的用户编号'")
    private String attentionId;

    @Column(name = "create_time", columnDefinition = "datetime COMMENT '创建时间'")
    @Temporal(TemporalType.TIMESTAMP)
    @CreationTimestamp
    private Date createTime;

}
